package com.happy.springboot.bean;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @Auther: lifeng
 * @Date: 2018/6/19 15:38
 * @Description: 配置文件
 */
@Component
@ConfigurationProperties(prefix = "user")
public class MyProperties1 {
    private String name;
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "[name:="+name+",age:="+age+"]";
    }
}
